#pragma once

#include "window.hpp"
#include "Pipeline.hpp"
#include "Device.hpp"
#include "SwapChain.hpp"
#include "Model.hpp"

#include <memory>
#include <vector>

namespace hamster
{
    class FirstApp
    {
        public:
            static constexpr int WIDTH = 800;
            static constexpr int HEIGHT = 600;

            FirstApp();
            ~FirstApp();

            FirstApp(const FirstApp&) = delete;
            void operator=(const FirstApp&) = delete;

            void run();

        private:
            void loadModels();
            void createPipelineLayout();
            void createPipeline();
            void createCommandBuffers();
            void drawFrame();

            Window window { WIDTH, HEIGHT, "Hamster Vulkan" };
            Device device { window };
            SwapChain swapChain {
                device,
                window.getExtent()
            };
            VkPipelineLayout pipelineLayout;
            std::unique_ptr<Hamster_Pipeline> pipeline;
            std::vector<VkCommandBuffer> commandBuffers;
            std::unique_ptr<Model> model;
    };
} // namespace hamster